package com.zp.self.spring.父类与爷类的方法调用;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2021/4/5 16:02
 * @Modified By
 */
public class Test {
    //结论：就近原则
    public static void main(String[] args) {
        Son son1 = new Son();
        Parent son2 = new Son();
        Grand son3 = new Son();

       son1.eat();
       son2.eat();
       son3.eat();
    }
}
